// 针对charts的API操作都写在这里

import service from ".";

// 将所有的针对charts的请求，都封装到一个对象中
const chartsApi = {
    weekDoctorSchedules(date){
        return service.get(
            '/charts/doctorSchedules',
            {params: {date}}
        ).then(response=>response.data);
    },
    weekReserve(date){
        return service.get(
            '/charts/weekReserve',
            {params: {date}}
        ).then(response=>response.data);
    },
    weekDoctor(date){
        return service.get(
            '/charts/weekDoctor',
            {params: {date}}
        ).then(response=>response.data);
    },
    weekPatient(date){
        return service.get(
            '/charts/weekPatient',
            {params: {date}}
        ).then(response=>response.data);
    },
    reserveCount(date){
        return service.get(
            '/charts/reserveCount',
            {params: {date}}
        ).then(response=>response.data);
    },
    hotDoctorSchedules(date){
        return service.get(
            '/charts/hotDoctorSchedules',
            {params: {date}}
        ).then(response=>response.data);
    },
    hotDoctor(date){
        return service.get(
            '/charts/hotDoctor',
            {params: {date}}
        ).then(response=>response.data);
    },
    patientTotal(){
        return service.get(
            '/charts/patientTotal',
        ).then(response=>response.data);
    },
    doctorTotal(){
        return service.get(
            '/charts/doctorTotal',
        ).then(response=>response.data);
    },
    doctorSchedulesTotal(){
        return service.get(
            '/charts/doctorSchedulesTotal',
        ).then(response=>response.data);
    },
    reserveTotal(){
        return service.get(
            '/charts/reserveTotal',
        ).then(response=>response.data);
    },
};

export default chartsApi;